package vip.youngboy.freejump.db.model;

import vip.youngboy.freejump.db.constrants.ColumnType;

import java.io.Serializable;

/**
 * 数据库表列
 */
public class DBColumn implements Serializable {

    protected String name;

    protected String type;

    protected int length;

    protected int decimal;

    protected boolean required;

    protected boolean primary;

    protected String defaultValue;

    protected String comment;

    public DBColumn() {
        this.type = ColumnType.VARCHAR.toString();
        this.length = 50;
        this.decimal = 0;
        this.primary = false;
        this.required = false;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getLength() {
        return this.length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getDecimal() {
        return this.decimal;
    }

    public void setDecimal(int decimal) {
        this.decimal = decimal;
    }

    public boolean isRequired() {
        return this.required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public boolean isPrimary() {
        return this.primary;
    }

    public void setPrimary(boolean primary) {
        this.primary = primary;
    }

    public String getDefaultValue() {
        return this.defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getComment() {
        return this.comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

}

